Optimal. Leaf size=102 \[ \frac {a^2 x^4}{4}+\frac {a b \sin \left (c+d x^2\right )}{d^2}-\frac {a b x^2 \cos \left (c+d x^2\right )}{d}+\frac {b^2 \sin ^2\left (c+d x^2\right )}{8 d^2}-\frac {b^2 x^2 \sin \left (c+d x^2\right ) \cos \left (c+d x^2\right )}{4 d}+\frac {b^2 x^4}{8} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3379, 3317, 3296, 2637, 3310, 30} \[ \frac {a^2 x^4}{4}+\frac {a b \sin \left (c+d x^2\right )}{d^2}-\frac {a b x^2 \cos \left (c+d x^2\right )}{d}+\frac {b^2 \sin ^2\left (c+d x^2\right )}{8 d^2}-\frac {b^2 x^2 \sin \left (c+d x^2\right ) \cos \left (c+d x^2\right )}{4 d}+\frac {b^2 x^4}{8} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2637
Rule 3296
Rule 3310
Rule 3317
Rule 3379
Rubi steps
\begin {align*} \int x^3 \left (a+b \sin \left (c+d x^2\right )\right )^2 \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int x (a+b \sin (c+d x))^2 \, dx,x,x^2\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (a^2 x+2 a b x \sin (c+d x)+b^2 x \sin ^2(c+d x)\right ) \, dx,x,x^2\right )\\ &=\frac {a^2 x^4}{4}+(a b) \operatorname {Subst}\left (\int x \sin (c+d x) \, dx,x,x^2\right )+\frac {1}{2} b^2 \operatorname {Subst}\left (\int x \sin ^2(c+d x) \, dx,x,x^2\right )\\ &=\frac {a^2 x^4}{4}-\frac {a b x^2 \cos \left (c+d x^2\right )}{d}-\frac {b^2 x^2 \cos \left (c+d x^2\right ) \sin \left (c+d x^2\right )}{4 d}+\frac {b^2 \sin ^2\left (c+d x^2\right )}{8 d^2}+\frac {1}{4} b^2 \operatorname {Subst}\left (\int x \, dx,x,x^2\right )+\frac {(a b) \operatorname {Subst}\left (\int \cos (c+d x) \, dx,x,x^2\right )}{d}\\ &=\frac {a^2 x^4}{4}+\frac {b^2 x^4}{8}-\frac {a b x^2 \cos \left (c+d x^2\right )}{d}+\frac {a b \sin \left (c+d x^2\right )}{d^2}-\frac {b^2 x^2 \cos \left (c+d x^2\right ) \sin \left (c+d x^2\right )}{4 d}+\frac {b^2 \sin ^2\left (c+d x^2\right )}{8 d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.23, size = 92, normalized size = 0.90 \[ \frac {4 a^2 d^2 x^4+16 a b \sin \left (c+d x^2\right )-16 a b d x^2 \cos \left (c+d x^2\right )-2 b^2 d x^2 \sin \left (2 \left (c+d x^2\right )\right )-b^2 \cos \left (2 \left (c+d x^2\right )\right )+2 b^2 d^2 x^4}{16 d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.71, size = 84, normalized size = 0.82 \[ \frac {{\left (2 \, a^{2} + b^{2}\right )} d^{2} x^{4} - 8 \, a b d x^{2} \cos \left (d x^{2} + c\right ) - b^{2} \cos \left (d x^{2} + c\right )^{2} - 2 \, {\left (b^{2} d x^{2} \cos \left (d x^{2} + c\right ) - 4 \, a b\right )} \sin \left (d x^{2} + c\right )}{8 \, d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.54, size = 123, normalized size = 1.21 \[ \frac {\frac {4 \, {\left ({\left (d x^{2} + c\right )}^{2} - 2 \, {\left (d x^{2} + c\right )} c\right )} a^{2}}{d} - \frac {16 \, {\left (d x^{2} \cos \left (d x^{2} + c\right ) - \sin \left (d x^{2} + c\right )\right )} a b}{d} - \frac {{\left (2 \, d x^{2} \sin \left (2 \, d x^{2} + 2 \, c\right ) - 2 \, {\left (d x^{2} + c\right )}^{2} + 4 \, {\left (d x^{2} + c\right )} c + \cos \left (2 \, d x^{2} + 2 \, c\right )\right )} b^{2}}{d}}{16 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 93, normalized size = 0.91 \[ \frac {a^{2} x^{4}}{4}+\frac {b^{2} x^{4}}{8}-\frac {b^{2} \left (\frac {x^{2} \sin \left (2 d \,x^{2}+2 c \right )}{4 d}+\frac {\cos \left (2 d \,x^{2}+2 c \right )}{8 d^{2}}\right )}{2}+2 a b \left (-\frac {x^{2} \cos \left (d \,x^{2}+c \right )}{2 d}+\frac {\sin \left (d \,x^{2}+c \right )}{2 d^{2}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.50, size = 87, normalized size = 0.85 \[ \frac {1}{4} \, a^{2} x^{4} - \frac {{\left (d x^{2} \cos \left (d x^{2} + c\right ) - \sin \left (d x^{2} + c\right )\right )} a b}{d^{2}} + \frac {{\left (2 \, d^{2} x^{4} - 2 \, d x^{2} \sin \left (2 \, d x^{2} + 2 \, c\right ) - \cos \left (2 \, d x^{2} + 2 \, c\right )\right )} b^{2}}{16 \, d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.70, size = 95, normalized size = 0.93 \[ -\frac {b^2\,{\cos \left (d\,x^2+c\right )}^2-2\,a^2\,d^2\,x^4-b^2\,d^2\,x^4-8\,a\,b\,\sin \left (d\,x^2+c\right )+8\,a\,b\,d\,x^2\,\cos \left (d\,x^2+c\right )+2\,b^2\,d\,x^2\,\cos \left (d\,x^2+c\right )\,\sin \left (d\,x^2+c\right )}{8\,d^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.28, size = 136, normalized size = 1.33 \[ \begin {cases} \frac {a^{2} x^{4}}{4} - \frac {a b x^{2} \cos {\left (c + d x^{2} \right )}}{d} + \frac {a b \sin {\left (c + d x^{2} \right )}}{d^{2}} + \frac {b^{2} x^{4} \sin ^{2}{\left (c + d x^{2} \right )}}{8} + \frac {b^{2} x^{4} \cos ^{2}{\left (c + d x^{2} \right )}}{8} - \frac {b^{2} x^{2} \sin {\left (c + d x^{2} \right )} \cos {\left (c + d x^{2} \right )}}{4 d} + \frac {b^{2} \sin ^{2}{\left (c + d x^{2} \right )}}{8 d^{2}} & \text {for}\: d \neq 0 \\\frac {x^{4} \left (a + b \sin {\relax (c )}\right )^{2}}{4} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________